package com.heima.controller;

import com.heima.pojo.domain.Business;
import com.heima.service.BusinessService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/api/vm-service")
public class BusinessController {

    @Autowired
    private BusinessService businessService;

    @GetMapping("/businessType")
    public List<Business> getAll(){
       return businessService.list();
    }

}
